package com.ning.parking.service.impl;

import cn.hutool.extra.spring.SpringUtil;
import com.ning.parking.domain.ParkingLotMonthlyApply;
import com.ning.parking.domain.dto.ParkingLotMonthlyApplyProveEntity;
import com.ning.parking.service.ParkingLotMonthlyApplyService;
import com.scsonic.common.enums.monthly.MonthlyApplyProveTypeEnum;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author ChenN
 * @Date 2025/4/22 11:18
 * @Version 0.0.1
 **/
@Service
public class ParkingLotMonthlyApplyProveService {

    public void saveApplyProveList(Long monthlyMainApplyId, List<ParkingLotMonthlyApplyProveEntity> copyToList, MonthlyApplyProveTypeEnum base) {
        ParkingLotMonthlyApplyService monthlyApplyProveService = SpringUtil.getBean(ParkingLotMonthlyApplyService.class);
        ParkingLotMonthlyApply byId = monthlyApplyProveService.getById(monthlyMainApplyId);
        byId.setMonthlyRuleId(monthlyMainApplyId);
        monthlyApplyProveService.updateById(byId);
    }
}
